package com.baiyi.homeui.hshomeui.entity;

import android.text.TextUtils;

import com.baiyi.homeui.hshomeui.manage.MsgReceiverManager;

public class Disk {
    private int load;
    private int used;
    private int total;
    private int activity;
    private int temperature;
    private int readSpeed;
    private int writeSpeed;

    public int getLoad() {
        return load;
    }

    public void setLoad(int load) {
        this.load = load;
    }

    public int getUsed() {
        return used;
    }

    public void setUsed(int used) {
        this.used = used;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getActivity() {
        return activity;
    }

    public void setActivity(int activity) {
        this.activity = activity;
    }

    public int getTemperature() {
        if(!TextUtils.isEmpty(MsgReceiverManager.temp_unit)&&MsgReceiverManager.temp_unit.equals("Fahrenheit")){
            return (int) ((temperature *1.8) + 32);
        }
        return temperature;
    }

    public void setTemperature(int temperature) {
        this.temperature = temperature;
    }

    public int getReadSpeed() {
        return readSpeed;
    }

    public void setReadSpeed(int readSpeed) {
        this.readSpeed = readSpeed;
    }

    public int getWriteSpeed() {
        return writeSpeed;
    }

    public void setWriteSpeed(int writeSpeed) {
        this.writeSpeed = writeSpeed;
    }

    @Override
    public String toString() {
        return "Disk{" +
                "load=" + load +
                ", used=" + used +
                ", total=" + total +
                ", activity=" + activity +
                ", temperature=" + temperature +
                ", readSpeed=" + readSpeed +
                ", writeSpeed=" + writeSpeed +
                '}';
    }
}
